﻿using AutoRegistDependency.Attributes;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using HandyControl.Controls;
using Models.Entities.SystemEntities;
using Services.Sys;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HandyWpf.ViewModels
{
    [Component]
    public partial class MainWindowViewModel : ObservableObject
    {
        private readonly IMenuInfoService menuInfoService;
        [ObservableProperty]
        private List<MenuInfo> menuInfos;
        public MainWindowViewModel(IMenuInfoService menuInfoService)
        {
            this.menuInfoService = menuInfoService;
            MenuInfos = GetMainWinodowMenu();
        }
        public List<MenuInfo> GetMainWinodowMenu()
        {
            return menuInfoService.GetList(t => true);
        }

    }
}
